<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .progress {
        border: solid;
        padding: 5px;
        margin: 10px;
      }
      .progress .bar {
        height: 10px;
        width: 0%;
        background: greenyellow;
      }
    </style>
  </head>
  <body>
    <h1>HELLO Index</h1>

    <script>
      const baseURL = "http://127.0.0.1:8090/api";

      const xhr = new XMLHttpRequest();
      xhr.open("GET", "http://127.0.0.1:8090/text.xml");
      xhr.responseType = "document";
      // 成功响应 200 ok
      xhr.onload = function () {
        console.log(xhr.response);
        const doc = xhr.response;
        console.log(doc.querySelector("user name").innerHTML);
      };

      /* request */
      xhr.send();
    </script>
  </body>
</html>
